{% extends 'admin/master.html' %}
{% block body %}
    {{ super() }}
    <div class="container">
        {% if current_user.is_authenticated %}
            <div class="col-md-12">
                <h3>Open Event API Server debugging environment</h3>
                <p>
                    To start with, click on one of the Models above.
                </p>
            </div>
        {% else %}
            <div class="col-md-5 col-md-push-3">
                <form method="post">
                    {% for f in form if f.type != 'CSRFTokenField' %}
                        <div class="form-group {% if f.errors %}has-error{% endif %}">
                            {{ f.label }}
                            {{ f(class_="form-control") }}
                            {% if f.errors %}
                                <span class="help-block">
                            <ul style="padding-left: 16px;">
                                {% for e in f.errors %}
                                    <li>{{ e }}</li>
                                {% endfor %}
                            </ul>
                            </span>
                            {% endif %}
                        </div>
                    {% endfor %}

                    <button type="submit" class="btn btn-primary">Login</button>
                </form>
            </div>

        {% endif %}
    </div>

{% endblock body %}
